package edu.hnui.shop.request;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 封装登录的请求数据
 */
public class LoginRequest {
    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$",message = "手机号码格式不正确")
    private String telphone;
    @NotBlank(message = "密码不能为空")
    @Size(min=6,message = "密码长度不少于6位！")
    private String pwd;

    public String getTelphone() {
        return telphone;
    }

    public void setTelphone(String telphone) {
        this.telphone = telphone;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }
}
